function check() {
    var location = document.getElementsByName("location")[0];
    if (location.value == "")
    {
        alert("地点为空，请输入灾情地点！");
        return false;
    }
    var longitude = document.getElementsByName("longitude")[0];
    if (longitude.value == "")
    {
        alert("经度为空，请输入灾情经度！");
        return false;
    }
    var latitude = document.getElementsByName("latitude")[0];
    if (latitude.value == "")
    {
        alert("纬度为空，请输入灾情纬度！");
        return false;
    }
    var time = document.getElementsByName("time")[0];
    if (time.value == "")
    {
        alert("时间为空，请输入灾情时间！");
        return false;
    }
    var degree = document.getElementsByName("degree");
    var degree_flag = false;
    for (var i=0; i<degree.length; i++)
    {
        if (degree[i].checked)
        {
            degree_flag = true;
        }
    }
    if (!degree_flag)
    {
        alert("震感为空，请输入灾情震感！");
        return false;
    }
    var reaction = document.getElementsByName("reaction");
    var reaction_flag = false;
    for (var i=0; i<reaction.length; i++)
    {
        if (reaction[i].checked)
        {
            reaction_flag = true;
        }
    }
    if (!reaction_flag)
    {
        alert("民众反应为空，请输入灾情民众反应！");
        return false;
    }
    var destory = document.getElementsByName("destory")[0];
    if (destory.value == "")
    {
        alert("建筑物损害程度为空，请输入灾情建筑物损害程度！");
        return false;
    }
    var dead = document.getElementsByName("dead")[0];
    if (dead.value == "")
    {
        alert("死亡人数为空，请输入灾情死亡人数！");
        return false;
    }
    var hurt = document.getElementsByName("hurt")[0];
    if (hurt.value == "")
    {
        alert("受伤人数为空，请输入灾情受伤人数！");
        return false;
    }
    var elec = document.getElementsByName("elec");
    var elec_flag = false;
    for (var i=0; i<elec.length; i++)
    {
        if (elec[i].checked)
        {
            elec_flag = true;
        }
    }
    if (!elec_flag)
    {
        alert("电力情况为空，请输入灾情电力情况！");
        return false;
    }
    var traffic = document.getElementsByName("traffic");
    var traffic_flag = false;
    for (var i=0; i<traffic.length; i++)
    {
        if (traffic[i].checked)
        {
            traffic_flag = true;
        }
    }
    if (!traffic_flag)
    {
        alert("交通情况为空，请输入灾情交通情况！");
        return false;
    }
    var concat = document.getElementsByName("concat");
    var concat_flag = false;
    for (var i=0; i<concat.length; i++)
    {
        if (concat[i].checked)
        {
            concat_flag = true;
        }
    }
    if (!concat_flag)
    {
        alert("通信情况为空，请输入灾情通信情况！");
        return false;
    }
    var water = document.getElementsByName("water");
    var water_flag = false;
    for (var i=0; i<water.length; i++)
    {
        if (water[i].checked)
        {
            water_flag = true;
        }
    }
    if (!water_flag)
    {
        alert("供水情况为空，请输入灾情供水情况！");
        return false;
    }
    var gas = document.getElementsByName("gas");
    var gas_flag = false;
    for (var i=0; i<gas.length; i++)
    {
        if (gas[i].checked)
        {
            gas_flag = true;
        }
    }
    if (!gas_flag)
    {
        alert("供气情况为空，请输入灾情供气情况！");
        return false;
    }
    var type = document.getElementsByName("type");
    var type_flag = false;
    for (var i=0; i<type.length; i++)
    {
        if (type[i].checked)
        {
            type_flag = true;
        }
    }
    if (!type_flag)
    {
        alert("次生灾害事件为空，请输入灾情次生灾害事件！");
        return false;
    }
    var food = document.getElementsByName("food")[0];
    if (food.value == "")
    {
        alert("食物需求为空，请输入灾情食物需求！");
        return false;
    }
    var tent = document.getElementsByName("tent")[0];
    if (tent.value == "")
    {
        alert("帐篷需求为空，请输入灾情帐篷需求！");
        return false;
    }
    var quilt = document.getElementsByName("quilt")[0];
    if (quilt.value == "")
    {
        alert("棉被需求为空，请输入灾情棉被需求！");
        return false;
    }
    var drug = document.getElementsByName("drug")[0];
    if (drug.value == "")
    {
        alert("药品需求为空，请输入灾情药品需求！");
        return false;
    }
    return true;
}